#include<bits/stdc++.h>
using namespace std;
#define ll long long
#define D long double
#define N 200005
int head[N],nxt[N],ver[N],tot=1,edg[N],used[N],vis[N];
void add(int x,int y){
	ver[++tot]=y;
	nxt[tot]=head[x];head[x]=tot;
}
vector<int> pt;int bk[N],imp[N],in[N];
vector<int> can;
inline void redel(int x){
	queue<int> q;q.push(x);in[x]=bk[x]=0;
	while(q.size()){
		int x=q.front();q.pop();
		for(int i=head[x];i;i=nxt[i]){
			int y=ver[i];
			if(!bk[y])	continue;
			in[y]=bk[y]=0;q.push(y);
		}
	}
}
inline void bfs1(int X){
	queue<int> q;q.push(X);int pos=-1;bk[X]=-1;vis[X]=X;
	while(q.size()){
		int x=q.front();q.pop();
		for(int i=head[x];i;i=nxt[i]){
			int y=ver[i];
			if(vis[y]==X)	continue;
			vis[y]=X;
			bk[y]=x;in[y]=i;q.push(y);
			if(imp[y]){
				pos=y;break;
			}
		}
	}
	if(pos==-1)	return;
	can.push_back(X);can.push_back(pos);imp[pos]=imp[X]=0;used[pos]=used[X]=1;
	while(bk[pos]!=-1){
		edg[in[pos]]^=1;edg[in[pos]^1]^=1;pos=bk[pos];
	}
}
inline void bfs2(int X){
	queue<int> q;q.push(X);int pos=-1;bk[X]=-1;vis[X]=X;
	while(q.size()){
		int x=q.front();q.pop();
		for(int i=head[x];i;i=nxt[i]){
			int y=ver[i],z=edg[i];
			if((vis[y]==X)||(!z))	continue;
			vis[y]=X;
			bk[y]=x;in[y]=i;q.push(y);
			if(used[y]){
				pos=y;break;
			}
		}
	}
	int tp=pos;
	used[X]=used[pos]=0;stack<int> ans;
	while(pos!=-1){
		ans.push(pos);pos=bk[pos];
	}
	while(bk[tp]!=-1){
		edg[in[tp]]^=1;edg[in[tp]^1]^=1;tp=bk[tp];
	}
	cout<<ans.size()<<" ";
	while(ans.size()){
		cout<<ans.top()<<" ";ans.pop();
	}
	cout<<"\n";
}
int fa[N];
int getf(int x){
	if(x==fa[x])	return x;
	return (fa[x]=getf(fa[x]));
}
vector<int> tmp;
int fth[N][21],dep[N];
void dfs(int x,int fa){
	fth[x][0]=fa;dep[x]=dep[fa]+1;
	for(int i=1;i<=20;i++){
		fth[x][i]=fth[fth[x][i-1]][i-1];
	}
	for(int i=head[x];i;i=nxt[i]){
		int y=ver[i];
		if(y==fa)	continue;
		dfs(y,x);
	}
	if(imp[x])	tmp.push_back(x);
}
inline int LCA(int x,int y){
	if(x==y)	return x;
	if(dep[x]<dep[y])	swap(x,y);
	for(int i=20;i>=0;i--){
		if(dep[fth[x][i]]>=dep[y])	x=fth[x][i];
	}
	if(x==y)	return x;
	for(int i=20;i>=0;i--){
		if(fth[x][i]!=fth[y][i])	x=fth[x][i],y=fth[y][i];
	}
	return fth[x][0];
}
int cf[N];
void dfs2(int x,int fa,int in){
	for(int i=head[x];i;i=nxt[i]){
		int y=ver[i];
		if(y==fa)	continue;
		dfs2(y,x,i);cf[x]+=cf[y];
	}
	edg[in]=cf[x]&1;edg[in^1]=cf[x]&1;
}
signed main(){
	freopen("travel.in","r",stdin);
	freopen("travel.out","w",stdout);
	ios::sync_with_stdio(0);cin.tie(0);cout.tie(0);
	srand(time(0));mt19937 rd(rand());
	int n,m,k;cin>>n>>m>>k;
	for(int i=1;i<=n;i++)	fa[i]=i;
	if(k<=1){
		cout<<0;return 0;
	}                  
	for(int i=1;i<=m;i++){
		int x,y;cin>>x>>y;
		int tx=getf(x),ty=getf(y);
		if(tx==ty)	continue;
		fa[tx]=ty;add(x,y);add(y,x);
	}
	for(int i=1;i<=k;i++){
		int x;cin>>x;imp[x]=1;pt.push_back(x);
	}
	for(int i=0;i<pt.size();i++){
		int x=rd()%pt.size();swap(pt[i],pt[x]);
	}
	/*for(int i=0;i<pt.size();i++)if(imp[pt[i]]){//This may be TLE
		bfs1(pt[i]);//redel(pt[i]);
	}*/
	for(int i=1;i<=n;i++)if(!dep[i]){
		dfs(i,0);
		if(tmp.size()<=1){
			tmp.clear();continue;
		}
		for(int j=0;j<tmp.size()-1;j+=2){
			int x=tmp[j],y=tmp[j+1],l=LCA(x,y);
			cf[x]++;cf[y]++;cf[l]-=2;
			used[x]=used[y]=1;can.push_back(x);can.push_back(y);
		}
		dfs2(i,0,0);tmp.clear();
	}
	cout<<can.size()/2<<"\n";
	//memset(vis,0,sizeof(vis));
	for(int i=0;i<can.size();i++)if(used[can[i]]){
		bfs2(can[i]);//redel(can[i]);
	}
	return 0;
}
/*
10 8 5
2 1
5 7
1 4
10 4
6 1
10 1
7 6
3 4
7 9 5 2 6
*/
